package cn.shop.cloud.web.util;

import org.apache.commons.codec.digest.DigestUtils;

/**
 * @program: shop-parent
 * @ClassName MD5Util
 * @description:
 * @author: Mokio
 * @create: 2024−12-24 16:19
 * @Version 2024 2.2 ; jdk1.8.0_181
 **/
// MD5加密工具类
public class MD5Util {

    // 需要被加密密码和盐值
    public static  String encode(String password,String salt){
        // MD5加密自带的方法
        String newPwd= DigestUtils.md5Hex(""+salt.charAt(0)+salt.charAt(2)+password+salt.charAt(4)+salt.charAt(5));


        return newPwd;
    }
}
